Chips
About Chips are elements of Circuits that process or provide signals. They can be used in Custom Rooms in Sandbox mode to perform computations and other operations, for example, to start and stop the game, keep track of the scores, respawn players, announce a winner, send messages to players, play sound effects, lock Room Doors, control Circuit Stage Lights, Holotars, Samplers, and Gizmos, etc. The signals in Circuits have integer values (32-bit signed integers) where 0 often means "false" or "off" and anything unequal to 0 often means "true" or "on". Chips process their signals about 10 times per second. The system evaluates chips in a particular order, i.e., a chip that produces a signal for another chip is usually evaluated before the other chip is evaluated (except in case of cycles where the evaluation order depends on the order in which the chips were connected). Thus, if there are no cycles, a signal can travel from a chip at one end of a circuit to a chip at another end of the circuit within just 1/10 of a second (one clock tick). If circuit visibility is activated in the This Room Menu of the Watch Menu, chips can be created with the “Chips” tab of the Maker Pen menu and appear as small black boxes. Most of the chips can be configured with the Settings tool of the Maker Pen. The pins of the chips can be connected and disconnected with the Connect tool of the Maker Pen. In general, input pins to a chip are on the left, and output pins from the chip are on the right. You can get information about most pins (function of input pins and current values of output pins) by pointing with the ray of the Connect tool at a pin for about 2 seconds. Input pins that are not connected to anything usually receive a 0 signal ("false"). A "true" signal (any integer unequal to 0) on "R" pins will reset a chip, i.e., produce a 0 output. Examples of circuits with most of these chips are on the page Circuit Diagrams. For common problems with chips, see the description of pitfalls on the circuits page. List of Chips This section describes all chips that are available in the "Chips" tab of the Maker Pen menu. You might have to turn on visibility of circuits in the This Room Menu of the Watch Menu to get access to this tab. Variable Variable chips hold three integer numbers that are available as output on the pins on the right side. You can set the values with the Settings tool of the Maker Pen. Combinator Combinator chips do mathematical operations on inputs. Currently, addition, subtraction, multiplication, division and modulo (remainder after division) operations are supported. You can set the operation with the Settings tool of the Maker Pen. A common application of the addition operation is to increment a score. Note that to increment a score, you need to connect the output of the chip to one input in order to add the new score to it. A common application of the modulo operation is to toggle between 0 and 1: by computing an input value modulo 2, the result will toggle between 0 and 1 if the input is incremented in steps of 1. Comparer Comparer chips do mathematical comparisons between the red input signal and the green input signal, including equals, not equals, greater than and less than operations. If "Advanced Mode" is not(!) checked in the settings, the red output ("if") is 1 if the comparison is "true" and 0 if it is "false", while the green output ("else") has the negated value. In "Advanced Mode" the red output has the value of the cyan input if the comparison is "true" and 0 if it is "false", while the green output ("else") has the value of the pink input if the comparison is "false" and 0 otherwise. You can set the comparison and the mode with the Settings tool of the Maker Pen. Output Output chips display the numeric value input on the red pin on the left. Message Message chips display a message to all players in a room when the red input pin on the left is set to "true", i.e., any number unequal to 0. The message is sent to only one player when the green pin is set to a player ID. The message is sent to all players on one team, if the blue pin is set to a team ID. The message can be edited with the Settings tool of the Maker Pen. Timer Timer chips can be used in countdown or looping countdown mode. The red pin on the left is an on/off switch; the timer must be held in an “on” state (signal unequal to 0) to operate; thus, a button press, which only sends a momentary 1, cannot run a timer on its own. The green pin is an input for the amount of time (in seconds) that a timer should operate. The red pin on the right outputs a momentary signal 1 when the timer expires (similar to goals and buttons). The green pin on the right is the current time left on a countdown. Delay Delay chips take a signal passed on the red pin, wait the amount of time provided by the green pin (in circuit ticks, i.e. 10th of seconds), and then output the signal from the red input pin momentarily on the red output pin before outputting 0 again, even if the input stays on a different value. It will emit a pulse again, if the input value changes to a different non-zero value. The minimum delay time (green input) is 1, even if you don't connect anything to the delay input. If new signals come in before the last one is put out, the delay chip buffers the latest 20 signals (value + delay) and outputs them in the correct order. Boolean Boolean chips act as logic gates, supporting "And", "Or", and "Not" operations. The output is a "true" (1) or "false" (0) signal on the right side. For "And", the output is "true" (1) if and only if all applied input signals are "true" (unequal to 0). For "Or" the output is "true" (1) if and only if any of the applied input signals is "true" (unequal to 0). For "Not", the output is "true" (1) if and only if the input signal is "false" (0). You can set the operation with the Settings tool of the Maker Pen. SFX When the input receives a True signal, the sound effect set is played. You can change the sound effect played by using edit mode of the maker pen. The sounds effects available are: Random When the red node gets a True signal, the random chip generates a steady output with a random number in the range from the green input (inclusive) to the blue input (exclusive). In other words, the value from the green input can appear, the value from the blue input cannot appear. To roll numbers from 1 to 6, input 1 to green and 7 to blue. The chip keeps outputting the last rolled number until a new number is rolled. A new number is rolled when any circuit element (including buttons) causes any circuit update and the red input has a true value at the same time. See Global Chip Update Tick for more detailed information about this behavior. Selector Chip The selector chip has two modes that can be set with the Settings tool of the Maker Pen: "First" and "All". The selector chip compares the red input signal with the numbers of output pins that are specified in the settings of the chip. If the mode is set to "First", the chip sends the green input signal to the first output pin that has the same number as the red input signal. All other output pins are set to 0. If the mode is set to "All", the chip sends the green input signal to all output pins that have the same number as the red input signal. Again, all other output pins are set to 0. Player / Team Depending on its settings (use the Settings tool of the Maker Pen), this chip can map a player ID to the number of the team and the index of the player on the team (first player on the team has index 1), and vica versa, as well as change a player to another team. Player Hit The player hit node can be used to detect who hits someone, and who is hit, and by how much damage. Red outputs the player ID of the attacker, green the player ID of the defender, blue the team ID of the attacker, cyan the team ID of the defender, and red the damage of the attack. Other than in other game modes, the damage of weapons is currently constant in sandbox rooms. It does not take into account factors like distance for grenade launchers or how far a bow has been pulled. Chips are only evaluated about every 10th of a second, but the player hit chip is buffered and therefore does not miss any hits. For example when hitting two players at the same time (with grenades or shotguns). The hit chip outputs both hits in sequence. If multiple hits occur during the tick period, the damage output is combined into a single tick. For example when hitting someone with a shotgun, all particles will be registered during the same tick and therefore output a damage of up to 136 in a single tick instead of 17 ticks of 8 damage. The Laser Burst Gun appears to fire about 15 shots per second and therefore outputs damages of 5 or 10 for body shots. Different than in previous updates, this also means that a weapon cannot be identified by its damage anymore. Weapon damages: In this table -- denotes that the attack will not cause the player hit chip to output anything, while 0 is a regular hit with no damage. The reduced damage column applies when a weapon or shield (paintball, quest or soccer shield) is hit. Weapon by damage: b stands for Base damage, r for Reduced damage, and c for Critical damage. Respawn The red input (respawn player on team node) respawns the player with the ID of the input signal on a valid respawn point. The green input respawns the entire team, where a signal of 1 is the blue team, 2 the red team, etc. -1 (or any negative value) respawns players of all teams. Game State Sends a momentary output of 1 on the appropriate pin when the game state changes: * Red = Game Start * Green = Game End * Blue = Pre-Game Start (5 to 6 seconds before Game Start) Set Game State A signal unequal to 0 (True) on the red pin starts the game (or more precisely: it starts the pre-game sequence and after 5 to 6 seconds, it starts the game). A signal unequal to 0 (True) on the green pin stops the game.The game length is set in the Watch Menu: This Room, Details tab, Setup button, Host tab. Get Score Scores from the scoreboard are output on the Red and Green pins for the Red and Blue teams respectively. This can be used to make announcements about the score. Set Score A Set Score chip's input on the Red pin will display on the scoreboard as red team’s score, and the input on the Green pin will display the blue team’s score. Player Stat Chip used to retrieve player stats given a player ID. The Red Input Pin takes in a player ID and the Red Output Pin outputs the value stored in whatever stat slot is selected through the chip settings menu. Set Player Stat This chip is used to set the value of a player stat. If the green pin is set to a value greater than 0 (True), then the value supplied in the blue pin is assigned to the stat selected in the settings of the player with the player ID that is specified by the signal in the red pin. Sending a -1 to the red pin sets the stat of all players. Stats can only be set when a game is in progress. "Stat1" shows up on the score board. Setting the Health stat to 0 (or less) puts the player in a dead state similar to paintball where they immediately drop their weapons, see everything in black and white, and lose the ability to interact with objects and to teleport. All player stats are set to their defaults when a player changes teams. The defaults are 0 for all stats except for Health which has a default of 1. Player Event A signal is sent from this chip when any of 4 player events occurs. When a player joins, their ID is sent from the Red Pin. When a player leaves, their ID is sent from the Green Pin. The count of players in the map is constantly sent from the Blue Pin. When a player changes teams, their ID is sent from the Cyan Pin. Category:Tools